<div class="grid_9">

<?php if($this->session->flashdata('type')): ?>
	<div class="<?php echo $this->session->flashdata('type')?>"><?php echo $this->session->flashdata('msg')?></div>
<?php endif; ?>

<div class="inner-border">
<h6>Edit Subject</h6>
<?php if(!empty($db_entries)): ?>
	<?php
		$formAttrib = array('id' => 'editsubject', 'class' => 'admin-form');
		foreach($db_entries as $db_entry){
			$hiddenAttrib = array('subject_id' => $db_entry->id);
			$subjectNameAttrib = array('name' => 'subjectname', 'value' => $db_entry->subject_name, 'id' => 'subjectname');
		}
		echo form_open('post/edit_subject', $formAttrib);
		
	?>
    
    <div class="input-block">
    <?php
		echo form_label('Subject name:', 'subjectname');
		echo form_input($subjectNameAttrib);
		echo form_hidden($hiddenAttrib);
		echo form_submit('update', 'Update');
	?>
    </div>
<?php else: ?>
	<div class="notice">Please try again</div>
<?php endif; ?>
<a href="<?php echo site_url('admin/subject') ?>" class="btn">Back</a>	
</div>
</div>